/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Mark
 */
package gamefiles;

import java.awt.Color;
import java.util.ArrayList;

public class StrategoLake extends Object
    {
    public StrategoLake()
        {
        throw new InstantiationError("Cannot Make your own objects of " +
                "StrategoLake.  Please use StategoLake.getLake() to get" +
                " the lake objects");
        }
    private StrategoLake(Coordinate cd) 
        {
        super();
        this.cd = cd;
        }
    public static ArrayList<StrategoLake> lakeCoors(Board bd)
        {
        ArrayList<StrategoLake> lakes = new ArrayList<StrategoLake>(LAKE_SIZE);
        lakes.add(new StrategoLake(bd.getCoordinate(4, 1)));
        lakes.add(new StrategoLake(bd.getCoordinate(4, 2)));
        lakes.add(new StrategoLake(bd.getCoordinate(5, 2)));
        lakes.add(new StrategoLake(bd.getCoordinate(5, 1)));
        lakes.add(new StrategoLake(bd.getCoordinate(4, 7)));
        lakes.add(new StrategoLake(bd.getCoordinate(4, 8)));
        lakes.add(new StrategoLake(bd.getCoordinate(5, 7)));
        lakes.add(new StrategoLake(bd.getCoordinate(5, 8)));
        return lakes;
        }
    public void draw()
        {
        Color formerCol = CSAGraphicLib.getPenColor();
        int penW = CSAGraphicLib.getPenWidth();
        // saves the past settings
        CSAGraphicLib.setPenColor(Color.BLUE);
        CSAGraphicLib.setPenWidth(Coordinate.MAX_PEN_WIDTH);
        // inputs the settings to draw the circle
        CSAGraphicLib.fillRectangle(cd.getX() - Coordinate.DEFAULT_RADIUS,
                cd.getY() - Coordinate.DEFAULT_RADIUS
                , cd.getX() + Coordinate.DEFAULT_RADIUS,
                cd.getY() + Coordinate.DEFAULT_RADIUS);
        //draws the Stratego piece
        CSAGraphicLib.setPenColor(formerCol);
        CSAGraphicLib.setPenWidth(penW);
        // turns the colors back to what they were before
        }
    private Coordinate cd;
    public static final int LAKE_SIZE = 8;
    }
